<form class="form-horizontal form-validate" action="{php echo webUrl('order/op/close')}" method="post" enctype="multipart/form-data">
    <input type='hidden' name='id' value='{$id}' />
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title">新建页面</h4>
            </div>
            <div class="modal-body" style="padding: 15px;">
                {if empty($list)}
                    <div class="empty-data">暂时没有可用模板，<a href="{php echo webUrl('store/diypage/add')}">立即创建模板</a></div>
                {else}
                    <table class="table">
                        <thead>
                        <th style="width: 50px;">ID</th>
                        <th>模板名称</th>
                        <th style="width: 120px;">操作</th>
                        </thead>
                    </table>
                    <div class="col-12" style="max-height: 300px; overflow-y: auto;">
                        <table class="table">
                            <thead class="zero">
                            <th style="width: 50px;"></th>
                            <th></th>
                            <th style="width: 120px;"></th>
                            </thead>
                            <tbody>
                            {loop $list $item}
                                <tr>
                                    <td>{$item['id']}</td>
                                    <td>{$item['name']}</td>
                                    <td>
                                        <a class="btn btn-default btn-sm" href="{php echo webUrl('store/diypage/page/add', array('templateid'=>$item['id'], 'storeid'=>$storeid))}">通过此模板创建</a>
                                    </td>
                                </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
                {/if}
            </div>
            <div class="modal-footer">
                <a class="btn btn-primary" href="{php echo webUrl('store/diypage/page/add')}">创建空页面</a>
                <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
            </div>
        </div>
    </div>
</form>
